package com.briup.demo.mapper;

import com.briup.demo.User;
import org.apache.ibatis.annotations.*;

import java.time.LocalDateTime;
import java.util.List;


@Mapper
public interface UserMapper {
    //写SQL语句

    //根据ID删除用户信息
    @Delete("delete from es_user where id = #{id}")
    public void deleteById(int id);

    //查询用户
        //查询全部用户
    public List<User> getAllUser();

        //条件查询
    public List<User> getUserByCondition(
            @Param("name") String name,
            @Param("status") Byte status,
            @Param("begin") LocalDateTime begin,
            @Param("end") LocalDateTime end
    );

    //更新用户
    public void updateUser(User user);

    //批量删除
    public void delUserByIds(@Param("ids") List<Integer> ids);
}






